;;;Creates incremented number text along any angle and with any justification.
;;;
;;;	Author:
;;;		Henry C. Francis
;;;		425 N. Ashe St.
;;;		Southern Pines, NC 28387
;;;
;;;	http://paracadd.com
;;;	All rights reserved.
;;;
(DEFUN C:INCTXT ()
  (SETQ incrno (GETINT "\nNumber of increments? "))   ;get number of increments
  (SETQ strtno (GETREAL "\nStarting number? "))       ;get starting number
  (SETQ incval (GETREAL "\nIncrement value? "))       ;get increment value
  (SETQ txthgt (GETREAL "\nText height? "))           ;get text height
  (INITGET 11 "Vertical Horizontal Angle")
  (SETQ verhor (GETKWORD "\nVertical, Horizontal or Angled spacing? "))
  (SETQ txtspc (GETREAL "\nDistance between text? ")) ;get text spacing
  (COND
    ((EQ verhor "Vertical")
      (IF (< txtspc 0)
        (SETQ arrdir (* pi 0.5)                       ;make neg. go up
              txtspc (ABS txtspc))                    ;...by a pos. distance
        (SETQ arrdir (* pi 1.5))                      ;make pos. go down
      )
    )
    ((EQ verhor "Horizontal")
      (IF (< txtspc 0)
        (SETQ arrdir pi                               ;make neg. go left
              txtspc (ABS txtspc))                    ;...by a pos. distance
        (SETQ arrdir 0)                               ;make pos. go right
      )
    )
    ((EQ verhor "Angle")
      (setq arrdir (*(/(GETREAL "\nAngle to increment along? ")180)pi))
    )
  )
  (SETQ txtpnt (GETPOINT "\nText starting point? "))  ;get starting point
                                                      ;get justification
  (INITGET 1 "L C M R TL TC TR ML MC MR BL BC BR")
  (SETQ txtjst (GETKWORD "\nText justification: Left/Center/Middle/Right/TL/TC/TR/ML/MC/MR/BL/BC/BR  "))
  (SETQ countr 0)
  (WHILE (< countr incrno)
    (IF (EQ txtjst "Left")
      (COMMAND ".text" txtpnt txthgt 0 (rtos strtno 2 2))
      (COMMAND ".text" "j" txtjst txtpnt txthgt 0 (rtos strtno 2 2))
    )
    (SETQ countr (1+ countr)
          strtno (+ strtno incval))
    (SETQ txtpnt (POLAR txtpnt arrdir txtspc))
  )
  (PRINC)
)